<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>Document</title>
	<style type="text/css">
		.box{
			width: 140px;
			height: 60px;
			border: solid #eee;
			position: relative;
		}
		.bbbox{
			color: white;
			position: absolute;
			right: 100px;
			width: 15px;
			height: 20px;
			background-color: red;
			border-radius: 8px;
			text-align: center;
		}
		.bbbbox{
			width: 140px;
			height: 30px;
			color: black;
			position: absolute;
			right: -40px;
			top: 20px;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="bbox"><div class="bbbox">0</div>
			<div class="bbbbox">我的购物车</div>
	</div>
</div>
</body>
</html>